﻿
namespace Huirui.Cavan.Core.Storage
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics.Contracts;
    using System.Linq;

    /// <summary>
    ///     Session Wrapper. Provides common indexer access to the underlying session storage type
    /// </summary>
    public interface ISessionStorage
    {
        /// <summary>
        ///     TreeView uses it for storing small collections on the server side
        /// </summary>
        /// <param name = "name"></param>
        /// <returns></returns>
        object this[string name] { get; set; }

        /// <summary>
        ///     Remove all keys from the session. 
        ///     For instance this allows smoother recovery on any break down.
        /// </summary>
        void Clear();
    }
}